package com.example.springboot.RabbitMQ.Config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.rabbit.transaction.RabbitTransactionManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;



@Configuration
@Slf4j
public class RabbitTransactionConfig {

//    @Bean
//    public RabbitTransactionManager transactionManager(CachingConnectionFactory cachingConnectionFactory){
//        return new RabbitTransactionManager(cachingConnectionFactory);
//    }
//
//    @Bean
//    public RabbitTemplate rabbitTemplate(CachingConnectionFactory cachingConnectionFactory){
//        RabbitTemplate rabbitTemplate = new RabbitTemplate(cachingConnectionFactory);
//        rabbitTemplate.setChannelTransacted(true);
//        return rabbitTemplate;
//    }

}
